package com.gw.websocket.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;

@Controller
public class LoginController {
    @RequestMapping("/")
    public String login(){
        return "login";
    }
    @RequestMapping("dologin")
    public String doLogin(String uname, String upwd, HttpSession session){
        session.setAttribute("uname",uname);
        return "main";
    }
}
